/*
 * Vector3.h
 *
 *  Created on: 02-11-2012
 *
 */

#ifndef VECTOR3_H_
#define VECTOR3_H_

#include "EVector2.h"

template <typename TYPE>
struct Vector3
{
    TYPE x, y, z;

    Vector3();
    Vector3(TYPE x, TYPE y, TYPE z);

    TYPE 					length			();
    TYPE 					dot				(const Vector3& other);
    Vector3& 				normalize		();
    Vector3<TYPE> 			cross			(const Vector3& other);
    Vector3<TYPE> 			operator-		();
    Vector3<TYPE> 			operator*		(float mul);
    Vector3<TYPE> 			operator/		(float div);
    Vector2<TYPE> 			xy();
    Vector2<TYPE> 			xz();
    Vector2<TYPE> 			yz();

    static Vector3<TYPE> 	getUnitX		();
    static Vector3<TYPE> 	getUnitY		();
    static Vector3<TYPE> 	getUnitZ		();

};

template <typename TYPE>
Vector3<TYPE> operator+(const Vector3<TYPE>& a, const Vector3<TYPE>& b);

template <typename TYPE>
Vector3<TYPE> operator-(const Vector3<TYPE>& a, const Vector3<TYPE>& b);

#endif /* VECTOR3_H_ */
